This repository has been archived by the owner on Oct 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Fix eip1153_tstore from EF #428
Open
iinaki
wants to merge
15
commits into
main
Choose a base branch
from
fix-eip1153_tstore
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Benchmarking resultsBenchmark for program
|
Command | Mean [s] | Min [s] | Max [s] | Relative |
---|---|---|---|---|
evm_mlir_factorial |
2.391 ± 0.275 | 2.068 | 2.608 | 1.00 |
revm_factorial |
7.810 ± 1.288 | 6.951 | 10.264 | 3.27 ± 0.66 |
Benchmark for program fibonacci
Open benchmarks
Command | Mean [s] | Min [s] | Max [s] | Relative |
---|---|---|---|---|
evm_mlir_fibonacci |
2.181 ± 0.279 | 1.914 | 2.448 | 1.00 |
revm_fibonacci |
7.834 ± 0.789 | 7.430 | 9.401 | 3.59 ± 0.58 |
iinaki
requested review from
MegaRedHand,
juanbono,
azteca1998,
edg-l,
TomasArrachea,
JulianVentura and
igaray
as code owners
September 19, 2024 20:55
belfortep
reviewed
Sep 20, 2024
src/syscall.rs
Outdated
}; | ||
|
||
if gas_refund > 0 { | ||
self.inner_context.gas_refund += gas_refund as u64; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should TSTORE
refund gas? Here in EVM Codes the only opcode that seems to trigger refunds is SSTORE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I believed it did refund gas but it doesn't. Here in the EIP says so too. Thanks for finding that out!
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes lambdaclass/ethereum_rust#621
Changes
Journal
.codegen_tstore
and thecodegen_tload
, and their corresponding syscalls.During testing I noticed that the changes made to the handle of the transient storage were positive and that the reason of the failing of the tests relies on MLIR taking up too much stack space, which causes to violently overflow at a given point.
The test passes if run with
RUST_MIN_STACK=83886080 make test-eth
. This means that our implementation oftstore
andtload
is correct. I propose to keep skipping the test and leave the problem of optimizing memory usage with MLIR for further on, while merging this PR as the changes proposed are useful I believe.